﻿@model IEnumerable<MvcMusicStore.Models.Genre>

@{
    ViewBag.Title = "Store";
}

<h2>Browse Genres</h2>

<p>Select from @Model.Count() genres;</p>

<ul>
    @foreach (var genre in Model)
    {
        // if we use this function though it works but we can't change controller name.
        // <li><a href="/Store/Browse?genre=@genre.Name">@genre.Name</a></li>
        
        <li>@Html.ActionLink(genre.Name, "Browse", new { genre = genre.Name })</li>
    }
</ul>
